package com.caesar.method_son;

import com.caesar.method_fa.Employee;

/**
 * @author caesar
 * @date 2025/7/9
 * @Description:正式员工
 * @apiNote
 */
public class SalaryEmployee extends Employee {
    private double salary;

    public SalaryEmployee() {
    }

    public SalaryEmployee(String name, double salary) {
        super(name);
        this.salary = salary;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    @Override
    public double earning() {
        return salary;
    }

    @Override
    public String getBasicInfo() {
        return "职位：正式工"+"\t姓名：" + getName() + "\t月薪：" + salary;
    }
}
